package cn.juque.abstractfactory.service;

import cn.juque.abstractfactory.entity.ModelY;
import cn.juque.abstractfactory.product.Tesla;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>ModelYPipelineServiceImpl</li>
 * </ul>
 * @date 2023-06-11 14:37:54
 **/
public class ModelYTeslaPipelineServiceImpl implements TeslaPipelineService {

    /**
     * 造车
     *
     * @return Tesla
     */
    @Override
    public Tesla create() {
        ModelY modelY = new ModelY("modelY");
        this.createPower(modelY);
        this.createGps(modelY);
        return modelY;
    }

    /**
     * 提供电源系统
     *
     * @param tesla 能源车对象
     */
    @Override
    public void createPower(Tesla tesla) {
        System.out.println("添加刀片电池系列的电源系统");
    }

    /**
     * 提供GPS
     *
     * @param tesla 能源车对象
     */
    @Override
    public void createGps(Tesla tesla) {
        System.out.println("添加北斗导航系统");
    }
}
